/*
 * 本材料用于定义各项异性传热材料的热物性参数，包括密度，比热和导热系数。其中导热系数给定主方向和副方向的导热系数，换算到x，y,z方向
 * 对于任意分布的材料，首先需要通过局部坐标转换计算出x,y,z方向的导热系数，再赋值到本材料中
 */
/*  初级版本: 2017年3月21日
 *   Author: liuxiao
 *   该版本所有物性参数为常数
 */

#include "RankTwoTensor.h"

#include "Material.h"
//#include "ComputeRotatedElasticityTensorBase.h"

#pragma once
//Forward Declarations
class Function;


class FreeAnisoHeatConductionMaterial : public Material
{
public:
	FreeAnisoHeatConductionMaterial(const InputParameters & parameters);

protected:
  virtual void computeProperties();
  Real compute_cos(Point p1,Point p2);//该函数用于计算两个向量的夹角余弦，这里用来计算主方向与坐标轴的夹角余弦

  const bool _has_temperature;
  const VariableValue & _temperature;



  const Real _my_thermal_conductivity_1;
  const Real _my_thermal_conductivity_2;
  const Real _my_thermal_conductivity_3;//前缀my用于get值，后面没前缀的用于物性参数赋值，注意区分
  const Point _my_direction_1;
  const Point _my_direction_2;
  const Point _my_direction_3;
  const Real _my_specific_heat;
  const Real _my_density;

   MaterialProperty<Point>  & _direction_1;//主方向1
   MaterialProperty<Point>  & _direction_2;//主方向2
   MaterialProperty<Point>  & _direction_3;//主方向3
   MaterialProperty<Real>  & _thermal_conductivity_1;
   MaterialProperty<Real>  & _thermal_conductivity_2;
   MaterialProperty<Real>  & _thermal_conductivity_3;

//   MaterialProperty<RankTwoTensor> & _conductivity_matrix;
//   MaterialProperty<RankTwoTensor> & _translate_conductivity_Trans;
//  MaterialProperty<RankTwoTensor> * const _translate_conductivity;
//   const RankTwoTensor translate_conductivity;
//   const RankTwoTensor conductivity_matrix;
   MaterialProperty<Real> & _specific_heat;
   MaterialProperty<Real> & _density;
   MaterialProperty<RankTwoTensor> & _conductivity_matrix_xyz;//热传导系数矩阵，见文献《正交各向异性材料三维热传导问题的有限元列式》，闫相桥等

};

template<>
InputParameters validParams<FreeAnisoHeatConductionMaterial>();



